package similarity;

import preprocess.XMLDoc;

public class AverageSimilarity implements Similarity
{
    SimpleTEDSimilarity ted  = new SimpleTEDSimilarity();
    TextSimilarity      text = new TextSimilarity();

    @Override
    public double calcSimilarity(XMLDoc doc1, XMLDoc doc2)
    {
        double s1 = ted.calcSimilarity(doc1, doc2);
        double s2 = text.calcSimilarity(doc1, doc2);
        return (s1 + s2) / 2;
    }
}
